#include "task.hpp"
#include "ThreadPool.hpp"
#include "RingQueue.hpp"
#include <pthread.h>
#include <time.h>

int main()
{
    srand(time(nullptr));
    const std::string op = "+-*/";
    ThreadPool<task>::GetInstance()->Start();
    while(1)
    {
        task t(rand()%100, rand()%100+1, op[rand()%4]);
        std::cout << t.GetRaw() << "\n";
        ThreadPool<task>::GetInstance()->push(t);
        sleep(1);
    }
    return 0;
}